package com.layblog.controller;

import com.layblog.common.lang.Result;
import com.layblog.service.UserSignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping(value = "/userSign")
public class UserSignController extends BaseController {

    @Autowired
    private UserSignService userSignService;

    /**
     * 用户签到
     */
    @ResponseBody
    @PostMapping(value = "/sign")
    public Result sign(String userId) {
        return userSignService.sign(userId);
    }
}
